-- GENERATED SPELL FOR [Gatekeeper Melindra] --


function spell0_32373(pUnit, Event) --@Amplify Damage,n/a--
pUnit:FullCastSpellOnTarget(12738,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32373', 10323, 1)
end

function spell1_32373(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(38526,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32373', 598, 1)
end

function spell2_32373(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(17290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32373', 3000, 1)
end

function spell3_32373(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_32373', 0, 1)
end

function spell4_32373(pUnit, Event) --@Frostbolt,Self--
pUnit:FullCastSpellOnTarget(56837,pUnit)
pUnit:RegisterEvent('Sorts_32373', 7000, 1)
end

function Sorts_32373(pUnit, Event)
local choix_sorts_32373 = math.random(0, 4)
if choix_sorts_32373 == 0 then
pUnit:RegisterEvent('spell0_32373', 1, 1)
end
if choix_sorts_32373 == 1 then
pUnit:RegisterEvent('spell1_32373', 1, 1)
end
if choix_sorts_32373 == 2 then
pUnit:RegisterEvent('spell2_32373', 1, 1)
end
if choix_sorts_32373 == 3 then
pUnit:RegisterEvent('spell3_32373', 1, 1)
end
if choix_sorts_32373 == 4 then
pUnit:RegisterEvent('spell4_32373', 1, 1)
end
end

function mob32373_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32373', math.random(1500, 3000), 1)
end

function mob32373_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32373_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32373_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32373, 1, 'mob32373_Action')
RegisterUnitEvent(32373, 2, 'mob32373_Leave')
RegisterUnitEvent(32373, 3, 'mob32373_Kill')
RegisterUnitEvent(32373, 4, 'mob32373_Die')
